package com.example.user.service;


import com.example.common.model.UserDTO;
import com.example.user.mapper.UserMapper;
import com.example.user.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Mapper
public class UserService  {


    @Autowired
    private UserMapper userMapper;

    public UserDTO getUserById(String id) {
        UserDTO userDTO = new UserDTO();
        userDTO.setId(id);
        userDTO.setUserName("张三");
        userDTO.setSex("男");
        return userDTO;
    }

    public User getUserById(Long id){
        return userMapper.selectById(id);
    }

}
